<g:if test="${!isCompany}">
  <tr class="prop">
    <td valign="top" class="name">
      <label for="Representative">Representative:</label>
    </td>
    <td valign="top" class="value ${hasErrors(bean:officeCall, field:'rep','errors')}">
      <g:select optionKey="id" from="${officeCall.company?.reps}" name="officeCall.rep.id" value="${officeCall.rep.id}" ></g:select>
    </td>
  </tr>
  <tr class="prop">
    <td valign="top" class="name">
      <label for="contact">Company Contact:</label>
    </td>
    <td valign="top" class="value ${hasErrors(bean:officeCall,field:'contact','errors')}">
      <g:select optionKey="id" from="${officeCall.company?.contacts}" name="officeCall.contact.id" ></g:select>
    </td>
  </tr>
  <tr>
    <td></td>
    <td>
      <g:ifAnyGranted role="ROLE_ADMIN,ROLE_POWER_USER">
        <g:link controller="user" action="create" params="[companyId:officeCall.company.id]">Modify Contacts</g:link>
      </g:ifAnyGranted>
    </td>
  </tr>
</g:if>
<tr class="prop">
  <td valign="top" class="name">
    <label for="salesPerson">Call Type:</label>
  </td>
  <td valign="top" class="value ${hasErrors(bean:officeCall, field:'type','errors')}">
    <g:select optionKey="id" from="${OfficeCallType.list()}" name="officeCall.type.id" ></g:select>
  </td>
</tr>
<tr class="prop">
  <td valign="top" class="name">
    <label for="date">Date:</label>
  </td>
  <td valign="top" class="value ${hasErrors(bean:officeCall, field:'date','errors')}">
    <g:datePicker name="officeCall.date" value="${officeCall?.date}" precision="minute" ></g:datePicker>
  </td>
</tr>
<tr class="prop">
  <td valign="top" class="name">
    <label for="notes">Notes:</label>
  </td>
  <td valign="top" class="value ${hasErrors(bean:officeCall, field:'notes','errors')}">
    <textarea rows="5" cols="25" name="officeCall.notes">${fieldValue(bean:officeCall, field:'notes')}</textarea>
  </td>
</tr>
